package no.nordicsemi.android.nrfmesh.domain;

import lombok.Data;

@Data
public class Wave {
    /**
     * 段数
     */
    private String count;
    /**
     *
     * 重复次数
     */
//    private String repeat;
    /**
     * 该段时长  数字*500ms
     */
    private String time;
    /**
     * 电流强度档位
     */
    private String gear;
    /**
     * 波形
     * 波形:正弦波正、负、双波为 1、4、7;
     * 三角波正、负、双波为 2、5、8;
     * 脉冲波正、负、双波为 3、6、9;
     * 下拉框选择
     */
    private String type;
    /**
     * 脉宽，单位为10us，
     */
    private String pusle_witdth;
    /**
     * 频率
     */
    private String frequence;
    /**
     * 波形重复次数
     */
    //private String count;

    public String setTime(String time) {this.time = time;return time;}

    public String setGear(String gear) {
        if (gear == null) { this.gear = "00"; return this.gear; }
        try {
            int v = Integer.parseInt(gear.trim());
            this.gear = String.format("%02d", v);
        } catch (Exception e) {
            this.gear = gear;
        }
        return this.gear;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setPusle_witdth(String pusle_witdth) {
        this.pusle_witdth = pusle_witdth;
    }

    public void setFrequence(String frequence) {
        this.frequence = frequence;
    }

   // public String getCount() {
     //   return count;
   // }

    public void setCount(String count) {
        this.count = count;
    }
}
